<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	template="/pages/templates/template.xhtml">
	<ui:define name="metadata">
	</ui:define>
	<ui:define name="content">
		<h:form id="formFile" enctype="multipart/form-data">
			<div>
				<div class="div-titulo-tela">
					<p:outputLabel styleClass="titulo-tela">Pré-Cadastro de Alunos Aptos</p:outputLabel>
					<br /> <br />
					<p:separator></p:separator>
					<div class="div-titulo-botoes">
						<p:commandButton id="btnIncluir" value="Realizar Pré-Cadastro"
							ajax="true" disabled="#{!AlunoPrecadastroController.importado}"
							actionListener="#{AlunoPrecadastroController.realizaPrecadastro}"
							update="formFile">
						</p:commandButton>
						<p:commandButton value="Incluir Manualmente"></p:commandButton>
					</div>
				</div>
				<div>
					<div class="div-corpo-tela">
						<div class="div-mensagem">
							<p:messages id="messages" autoUpdate="true" closable="true" />
						</div>
						<p:fileUpload id="fupArquivo" mode="advanced" sizeLimit="100000"
							disabled="#{AlunoPrecadastroController.importado}"
							cancelLabel="Cancelar" uploadLabel="Importar" label="Selecionar"
							invalidFileMessage="Tipo do arquivo inválido." update="formFile"
							allowTypes="/(\.|\/)(txt|csv)$/"
							fileUploadListener="#{AlunoPrecadastroController.importaArquivo}" />
						<br />

						<p:dataTable id="dataTable" var="aluno"
							emptyMessage=""
							value="#{AlunoPrecadastroController.alunos}">
							<p:column headerText="Matrícula">
								<h:outputText value="#{aluno.matricula}" />
							</p:column>

							<p:column headerText="Nome">
								<h:outputText value="#{aluno.nome}" />
							</p:column>

							<p:column headerText="Documento">
								<h:outputText value="#{aluno.documento}" />
							</p:column>

							<p:column headerText="Coeficiente">
								<h:outputText value="#{aluno.coeficienteRendimento}" />
							</p:column>

							<p:column headerText="Formando">
								<h:outputText value="#{aluno.formando}" />
							</p:column>

						</p:dataTable>
					</div>
				</div>
			</div>
		</h:form>
	</ui:define>
</ui:composition>

